# _*_ coding:utf-8 _*_
# @File  : 脚本.py
# @Time  : 2022-05-30
# @Author: zizle
import json
import time

import requests

indexes = [
    'S6939239',
    'S6939261',
    'S0206628',
    'S0206605',
    'S0206582',
    'S0267357',
    'S0269793',
    'S0268794',
    'S0267364',
    'S0267365',
    'V3876209',
    'S0267353',
    'S0267354',
]


def get_indexes():
    url = 'http://210.13.218.130:9000/v1/datalib/table/'
    r = requests.get(url, params={'plat': 'wind', 'page': 1, 'page_size': 9999})
    index_objs = r.json()['data']['records']
    print('获取总数:', len(index_objs))
    exists_indexes = [i['source_id'] for i in index_objs]
    for my_index in indexes:
        if my_index not in exists_indexes:
            print(my_index)


if __name__ == '__main__':
    # get_indexes()
    # a = ['A', 'B', 'C']
    # b = [1,2,3]
    # c = [{'datadate': tp[0], 'datavalue': tp[1]} for tp in list(zip(a, b))]
    # print(c)
    with open('2023-11-23_月.json', 'r', encoding='utf8') as f:
        c = json.load(f)
    for i in c:
        if i['enddate'] < '2023-10-31':
            print(i)

